local fs,res
--带有默认值
function fs_init(filename,fs_size,fs_sector_size)
    fs_size = fs_size or 512
    fs_size = tonumber(fs_size)*1024
    filename = filename or "out.bin"
    fs_sector_size = tonumber(fs_sector_size or 4096)
    fs,res = require "fs".init(filename,fs_size,fs_sector_size)
    print(filename,fs_size,fs_sector_size)
end


--文件列表添加到文件系统中
--[[
	path_t:源文件列表
--]]

function fs_save(path_t)
    local fp,read_buf
    for k,v in ipairs(path_t) do
        fp = io.open(v.path,"rb")
        read_buf = fp:read("*a")
        fp:close()
		
		fs:add(v.name,read_buf)        
    end
end





